import Link from "next/link";
import type { TFunction } from "i18next";

export interface LinkBaseProps {
  lng: string;
  href: string;
  children: React.ReactNode;
  className?: string;
}

export const LinkBase = ({ lng, href, children, className }: LinkBaseProps) => {
  const fullHref = href.startsWith("/") ? `/${lng}${href}` : `/${lng}/${href}`;
  return (
    <Link href={fullHref} className={className}>
      {children}
    </Link>
  );
};
